<table width="100%"><tr><td width="20%">
<a href="../index.html">&lt; index</a><br />
<a href="index.html">&lt; 13. Path finding</a><br />
<a href="path_get.html">&lt; 13.3 Reading path information</a>
</td><td width="60%">
<p align="center">
=====================================<br />
13.4 Destroying a path<br />
=====================================<br />
</p></td><td width="20%">
</td></tr></table>
<style type="text/css">
.code { color:#444444; background-color:#EEEEEE;}
pre { color:#444444; background-color:#EEEEEE;}
table.param td { border : 1px solid #000000; }
th { background-color: #44BBFF; color: #FFFFFF }
table.none td { border : 0 }
</style>
To release the resources used by a path, destroy it with :<br />
<p class="code"><pre>
C++ : TCODPath::~TCODPath()
C   : void TCOD_path_delete(TCOD_path_t path)
Py  : path_delete(path)
</pre></p>
<table class="param">
<tr><th>Parameter</th><th>Description</th></tr>
<tr><td>path</td><td>In the C version, the path handler returned by one of the TCOD_path_new_* function.</td></tr>
</table>
<br />
Example :<br />
<p class="code"><pre>
C++ : TCODPath *path = new TCODPath(myMap); // allocate the path
      // use the path...      delete path; // destroy the path
C   : TCOD_path_t path = TCOD_path_new_using_map(my_map);
      /* use the path ... */
      TCOD_path_delete(path);
Py  : path = libtcod.path_new_using_map(my_map)
      # use the path ... 
      libtcod.path_delete(path)
</pre></p>
